<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<body>
<!-- 头部跟左边导航公共部分-->
<div th:fragment="common_top_left">
    <header class="main-header">
        <!-- Logo -->
        <a href="/index" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><b>A</b>LT</span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg">进销存</span>
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="../../dist/img/user2-160x160.jpg" class="user-image" alt="User Image">
                            <span class="hidden-xs">Alexander Pierce</span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- User image -->
                            <li class="user-header">
                                <img src="../../dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">

                                <p>
                                    Alexander Pierce - Web Developer
                                    <small>Member since Nov. 2012</small>
                                </p>
                            </li>
                            <!-- Menu Body -->
                            <li class="user-body">
                                <div class="row">
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Followers</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Sales</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Friends</a>
                                    </div>
                                </div>
                                <!-- /.row -->
                            </li>
                            <!-- Menu Footer-->
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="#" class="btn btn-default btn-flat">Profile</a>
                                </div>
                                <div class="pull-right">
                                    <a href="#" class="btn btn-default btn-flat">Sign out</a>
                                </div>
                            </li>
                        </ul>
                    </li>
                    <!-- Control Sidebar Toggle Button -->
                    <li>
                        <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                    </li>
                </ul>
            </div>
        </nav>
    </header>

    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel -->
            <div class="user-panel">
                <div class="pull-left image">
                    <img src="../../dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
                </div>
                <div class="pull-left info">
                    <p>Alexander Pierce</p>
                    <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
                </div>
            </div>
            <!-- search form -->
            <form action="#" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="q" class="form-control" placeholder="Search...">
                    <span class="input-group-btn">
                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
                </div>
            </form>
            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu" data-widget="tree">
                <li class="header">MAIN NAVIGATION</li>
                <li class="treeview" id="index">
                    <a href="#">
                        <i class="fa fa-dashboard"></i> <span>首页</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="/index"><i class="fa fa-circle-o"></i> 首页</a></li>
                    </ul>
                </li>
                <li class="treeview" id="purchase">
                    <a href="#">
                        <i class="fa fa-files-o"></i>
                        <span>采 购</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>

                        <!--<span class="pull-right-container">-->
              <!--<span class="label label-primary pull-right">4</span>-->
            <!--</span>-->
                    </a>
                    <ul class="treeview-menu">
                        <li id="purchase-2"><a href="/purchase/list"><i class="fa fa-circle-o"></i> 采购单</a></li>
                        <li id="purchase-3"><a href="/purchase/return"><i class="fa fa-circle-o"></i> 采购退货单</a></li>
                        <li id="purchase-5"><a href="/purchase/supplier"><i class="fa fa-circle-o"></i> 供应商管理</a></li>
                    </ul>
                </li>
                <li class="treeview" id="sale">
                    <a href="#">
                        <i class="fa fa-files-o"></i>
                        <span>销 售</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li id="sale1"><a href="/sale/list"><i class="fa fa-circle-o"></i> 销售单</a></li>
                        <li id="sale2"><a href="#"><i class="fa fa-circle-o"></i> 销售退货单</a></li>
                        <li id="sale3"><a href="/sale/custom_management"><i class="fa fa-circle-o"></i> 客户管理</a></li>
                    </ul>
                </li>
                <li class="treeview" id="forms">
                    <a href="#">
                        <i class="fa fa-pie-chart"></i>
                        <span>表 单</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li id="form1"><a href="/forms/purchase"><i class="fa fa-circle-o"></i> 采购表单</a></li>
                        <li id="form2"><a href="/forms/sell"><i class="fa fa-circle-o"></i> 销售表单</a></li>
                        <li id="form3"><a href="/forms/custom_sale"><i class="fa fa-circle-o"></i> 客户销量</a></li>
                        <li id="form4"><a href="/forms/goods_sale"><i class="fa fa-circle-o"></i> 商品销量</a></li>
                        <li id="form5"><a href="/forms/check"><i class="fa fa-circle-o"></i> 盘点报表</a></li>
                        <li id="form6"><a href="/forms/allot"><i class="fa fa-circle-o"></i> 调拨报表</a></li>
                        <li id="form7"><a href="/forms/operation_summary"><i class="fa fa-circle-o"></i> 经营汇总</a></li>
                        <li id="form8"><a href="/forms/goods_summary"><i class="fa fa-circle-o"></i> 商品汇总</a></li>
                    </ul>
                </li>
                <li class="treeview" id="stock">
                    <a href="#">
                        <i class="fa fa-laptop"></i>
                        <span>仓 库</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li id="stock-1"><a href="/stock/query"><i class="fa fa-circle-o"></i> 库存查询</a></li>
                        <li id="stock-2"><a href="/stock/account"><i class="fa fa-circle-o"></i> 库存流水</a></li>
                        <li id="stock-3"><a href="/stock/management"><i class="fa fa-circle-o"></i> 仓库管理</a></li>
                        <li id="stock-4"><a href="/stock/check_list"><i class="fa fa-circle-o"></i> 库存盘点单</a></li>
                        <li id="stock-5"><a href="/stock/requisition_note"><i class="fa fa-circle-o"></i> 库存调拨单</a></li>
                        <li id="stock-6"><a href="/stock/in_order"><i class="fa fa-circle-o"></i> 入库单</a></li>
                        <li id="stock-7"><a href="/stock/out_order"><i class="fa fa-circle-o"></i> 出库单</a></li>
                    </ul>
                </li>

                <li class="treeview" id="setting">
                    <a href="#">
                        <i class="fa fa-share"></i> <span>设置</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li class="treeview"  id="commodity">
                            <a href="#"><i class="fa fa-circle-o"></i> 商品设置
                                <span class="pull-right-container">
                  <i class="fa fa-angle-left pull-right"></i>
                </span>
                            </a>
                            <ul class="treeview-menu">
                                <li id="commodity-1"><a href="/setting/commodity_management"><i class="fa fa-circle-o"></i> 商品管理 </a></li>
                                <li id="commodity-2"><a href="/setting/commodity_category"><i class="fa fa-circle-o"></i> 商品分类</a></li>
                                <li id="commodity-3"><a href="/setting/color_management"><i class="fa fa-circle-o"></i> 颜色管理</a></li>
                                <li id="commodity-4"><a href="/setting/size_management"><i class="fa fa-circle-o"></i> 尺码管理</a></li>
                                <li id="commodity-5"><a href="/setting/brand_management"><i class="fa fa-circle-o"></i> 品牌管理</a></li>
                                <li id="commodity-6"><a href="/setting/material_management"><i class="fa fa-circle-o"></i> 材质管理</a></li>
                                <li id="commodity-7"><a href="/setting/style_management"><i class="fa fa-circle-o"></i> 款式管理</a></li>
                                <li id="commodity-8"><a href="/setting/season_management"><i class="fa fa-circle-o"></i> 季节管理</a></li>
                                <li id="commodity-9"><a href="/setting/unit_management"><i class="fa fa-circle-o"></i> 单位管理</a></li>
                                <li id="commodity-10"><a href="/setting/barcode_management"><i class="fa fa-circle-o"></i> 条码管理</a></li>
                            </ul>
                        </li>
                        <li class="treeview" id="xitong">
                            <a href="#"><i class="fa fa-circle-o"></i> 系统设置
                                <span class="pull-right-container">
                  <i class="fa fa-angle-left pull-right"></i>
                </span>
                            </a>
                            <ul class="treeview-menu">
                                <li id="xitong-1"><a href="/setting/person_info"><i class="fa fa-circle-o"></i> 个人信息 </a></li>
                                <li id="xitong-2"><a href="/setting/stores_and_employees"><i class="fa fa-circle-o"></i> 门店与员工</a></li>
                                <li id="xitong-3"><a href="/setting/role_management"><i class="fa fa-circle-o"></i> 角色管理</a></li>
                                <li id="xitong-4"><a href="/setting/company_announcement"><i class="fa fa-circle-o"></i> 公司公告</a></li>
                                <li id="xitong-5"><a href="/setting/print_model"><i class="fa fa-circle-o"></i> 打印模板</a></li>
                                <li id="xitong-6"><a href="/setting/logistics_management"><i class="fa fa-circle-o"></i> 物流管理</a></li>
                                <li id="xitong-7"><a href="/setting/system_parameters"><i class="fa fa-circle-o"></i> 系统参数</a></li>
                                <li id="xitong-8"><a href="/setting/system_log"><i class="fa fa-circle-o"></i> 系统日志</a></li>
                                <li id="xitong-9"><a href="/setting/quick_start"><i class="fa fa-circle-o"></i> 快速入门</a></li>
                            </ul>
                        </li>
                    </ul>
                </li>



                <li class="treeview">
                    <a href="#">
                        <i class="fa fa-table"></i> <span>网 店</span>
                        <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                    </a>
                    <ul class="treeview-menu">
                        <li><a href="pages/tables/simple.html"><i class="fa fa-circle-o"></i> Simple tables</a></li>
                        <li><a href="pages/tables/data.html"><i class="fa fa-circle-o"></i> Data tables</a></li>
                    </ul>
                </li>
                <li>
                    <a href="pages/mailbox/mailbox.html">
                        <i class="fa fa-envelope"></i> <span>提醒消息</span>
                        <span class="pull-right-container">
              <small class="label pull-right bg-yellow">12</small>
              <small class="label pull-right bg-green">16</small>
              <small class="label pull-right bg-red">5</small>
            </span>
                    </a>
                </li>
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>

    <script>
        var url = window.location.pathname;
        if (url=="/setting/commodity_management"){
            document.getElementById("commodity-1").classList.add("active");
            document.getElementById("commodity").classList.add("active");
            document.getElementById("setting").classList.add("active");
        } else if (url=="/setting/commodity_category"){
            document.getElementById("commodity-2").classList.add("active");
            document.getElementById("commodity").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if (url=="/setting/color_management"){
            document.getElementById("commodity-3").classList.add("active");
            document.getElementById("commodity").classList.add("active");
            document.getElementById("setting").classList.add("active");
        } else if (url=="/setting/size_management"){
            document.getElementById("commodity-4").classList.add("active");
            document.getElementById("commodity").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if (url=="/setting/brand_management"){
            document.getElementById("commodity-5").classList.add("active");
            document.getElementById("commodity").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if (url=="/setting/material_management"){
            document.getElementById("commodity-6").classList.add("active");
            document.getElementById("commodity").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if (url=="/setting/style_management"){
            document.getElementById("commodity-7").classList.add("active");
            document.getElementById("commodity").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if (url=="/setting/season_management"){
            document.getElementById("commodity-8").classList.add("active");
            document.getElementById("commodity").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if (url=="/setting/unit_management"){
            document.getElementById("commodity-9").classList.add("active");
            document.getElementById("commodity").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if(url=="/setting/barcode_management"){
            document.getElementById("commodity-10").classList.add("active");
            document.getElementById("commodity").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }

        //系统设置
        if (url=="/setting/person_info"){
            document.getElementById("xitong-1").classList.add("active");
            document.getElementById("xitong").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if (url=="/setting/stores_and_employees"){
            document.getElementById("xitong-2").classList.add("active");
            document.getElementById("xitong").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if (url=="/setting/role_management"){
            document.getElementById("xitong-3").classList.add("active");
            document.getElementById("xitong").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if (url=="/setting/company_announcement"){
            document.getElementById("xitong-4").classList.add("active");
            document.getElementById("xitong").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if (url=="/setting/print_model"){
            document.getElementById("xitong-5").classList.add("active");
            document.getElementById("xitong").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if (url=="/setting/logistics_management"){
            document.getElementById("xitong-6").classList.add("active");
            document.getElementById("xitong").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if (url=="/setting/system_parameters"){
            document.getElementById("xitong-7").classList.add("active");
            document.getElementById("xitong").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if (url=="/setting/system_log"){
            document.getElementById("xitong-8").classList.add("active");
            document.getElementById("xitong").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }else if(url=="/setting/quick_start"){
            document.getElementById("xitong-9").classList.add("active");
            document.getElementById("xitong").classList.add("active");
            document.getElementById("setting").classList.add("active");
        }
        //仓库
        else if(url=="/stock/query"){
            document.getElementById("stock-1").classList.add("active");
            document.getElementById("stock").classList.add("active");
        } else if(url=="/stock/account"){
            document.getElementById("stock-2").classList.add("active");
            document.getElementById("stock").classList.add("active");
        }else if(url=="/stock/management"){
            document.getElementById("stock-3").classList.add("active");
            document.getElementById("stock").classList.add("active");
        }else if(url=="/stock/check_list"){
            document.getElementById("stock-4").classList.add("active");
            document.getElementById("stock").classList.add("active");
        }else if(url=="/stock/requisition_note"){
            document.getElementById("stock-5").classList.add("active");
            document.getElementById("stock").classList.add("active");
        }
        else if(url=="/stock/in_order"){
            document.getElementById("stock-6").classList.add("active");
            document.getElementById("stock").classList.add("active");
        }
        else if(url=="/stock/out_order"){
            document.getElementById("stock-7").classList.add("active");
            document.getElementById("stock").classList.add("active");
        }

        //采购
        else if(url=="/purchase/order"){
            document.getElementById("purchase-1").classList.add("active");
            document.getElementById("purchase").classList.add("active");
        }else if(url=="/purchase/list"){
            document.getElementById("purchase-2").classList.add("active");
            document.getElementById("purchase").classList.add("active");
        }else if(url=="/purchase/return"){
            document.getElementById("purchase-3").classList.add("active");
            document.getElementById("purchase").classList.add("active");
        }else if(url=="/purchase/compensate"){
            document.getElementById("purchase-4").classList.add("active");
            document.getElementById("purchase").classList.add("active");
        }else if(url=="/purchase/supplier"){
            document.getElementById("purchase-5").classList.add("active");
            document.getElementById("purchase").classList.add("active");
        }
        //报表
        else if(url=="/forms/purchase"){
            document.getElementById("form1").classList.add("active");
            document.getElementById("forms").classList.add("active");
        } else if(url=="/forms/purchase_mobile"){
            document.getElementById("form1").classList.add("active");
            document.getElementById("forms").classList.add("active");
        } else if(url=="/forms/sell"){
            document.getElementById("form2").classList.add("active");
            document.getElementById("forms").classList.add("active");
        }else if(url=="/forms/custom_sale"){
            document.getElementById("form3").classList.add("active");
            document.getElementById("forms").classList.add("active");
        }else if(url=="/forms/goods_sale"){
            document.getElementById("form4").classList.add("active");
            document.getElementById("forms").classList.add("active");
        }else if(url=="/forms/check"){
            document.getElementById("form5").classList.add("active");
            document.getElementById("forms").classList.add("active");
        }else if(url=="/forms/allot"){
            document.getElementById("form6").classList.add("active");
            document.getElementById("forms").classList.add("active");
        }else if(url=="/forms/operation_summary"){
            document.getElementById("form7").classList.add("active");
            document.getElementById("forms").classList.add("active");
        }else if(url=="/forms/goods_summary"){
            document.getElementById("form8").classList.add("active");
            document.getElementById("forms").classList.add("active");
        }
        //销售
        else if(url=="/sale/list"){
            document.getElementById("sale1").classList.add("active");
            document.getElementById("sale").classList.add("active");
        }else if(url=="/sale/return"){
            document.getElementById("sale2").classList.add("active");
            document.getElementById("sale").classList.add("active");
        }else if(url=="/sale/custom_management") {
            document.getElementById("sale3").classList.add("active");
            document.getElementById("sale").classList.add("active");
        }
    </script>
</div>
</body>
</html>